<?
  require_once('facebook_sdk/facebook.php');

  $config = array(
    'appId' => '314860265232330',
    'secret' => 'de61791ac4eec6920ab83856c90b7861',
  );
try{
		$facebook = new Facebook($config);
		$user_id = $facebook->getUser();		
		$user = $facebook->getUser();
		$user_profile = $facebook->api('/me');
		}catch (FacebookApiException $e){
			$login_url = $facebook->getLoginUrl( array(
								   'scope' => 'publish_stream'
								   )); 
					echo '<a href="https://www.facebook.com/dialog/oauth?client_id=314860265232330&redirect_uri=http%3A%2F%2F117.17.102.203%2F&state=d4d526223a235d7eab4b8e8ad4005b72&scope=publish_stream" target="_top"><img src = "../view/CSS/image/facebook_login.png" id = "header_login"></a>';
		}
	
?>